﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetPE.Core;
using System.Windows.Forms;
using NetPE.Core.Pe;

namespace NetPE.TreeNodes
{
    public class OptionalHeaderNode : BaseNode
    {
        public OptionalHeaderNode(OptionalHeader hdr):base(hdr)
        {
            this.hdr = hdr;
            Nodes.Add(new StandardFieldsHeaderNode(hdr.StandardFields));
            Nodes.Add(new WindowsSpecificFieldsHeaderNode(hdr.WindowsSpecificFields));
            this.Text = "Optional Header";
            this.ImageIndex = this.SelectedImageIndex = NodeType.Header;
        }

        OptionalHeader hdr;
        public override object Data { get { return hdr; } }

        public override BaseEditor GetEditorControl()
        {
            return new BaseEditor();
        }
    }
}
